#ifndef MAINWINDOW_H
#define MAINWINDOW_H

#include <QMainWindow>
#include "ui_mainwindow.h"

namespace Ui {
class MainWindow;
}

class MainWindow : public QMainWindow
{
    Q_OBJECT
    
public:
    explicit MainWindow(QWidget *parent = 0);
    ~MainWindow();
    
private slots:
    void dblClick(QTreeWidgetItem* item, int column);

    void on_actionExit_triggered();

    void on_actionNew_2_triggered();

    void on_actionNew_triggered();

    void on_actionEdit_triggered();

    void on_actionRemove_triggered();

    void on_actionAbout_triggered();

    void on_actionLoad_triggered();

    void on_actionSave_triggered();

    void on_actionSave_as_triggered();

    void on_actionFind_triggered();

    void on_actionFind_Next_triggered();

    void on_actionJoin_File_triggered();

private:
    Ui::MainWindow *ui;
    QString fileName;
    QList<QTreeWidgetItem *> foundItems;
    int currentItem;

    void resetItems();
    void editItem(QTreeWidgetItem* item);
};

#endif // MAINWINDOW_H
